package com.kgame5.xtank3d.effect.myemitters {
import kgame5.k3d.core.obj3d.node3d.Node3D;
import kgame5.kmath.MathDG;

import com.kgame5.xtank3d.effect.MyEmitter;
import com.kgame5.xtank3d.resource.ResourceManagerX;

/**
 * @author kk
 */
public class PoisonPaosEmitter extends MyEmitter{
	public function PoisonPaosEmitter(r:int=32) {
				
		//T.p("PoisonPaosEmitter");
		
		var count:int=MathDG.random(12,14);
		
		for(var i:int=0;i<count;i++){
			var md_pao:Node3D=ResourceManagerX.getInstance().getPoisonPso();
			//Factory3D.CreateSprite3D("MyMc_poisonPao");
			
		
			md_pao.posi.polarXOZ(MathDG.random(0,360),r);
			md_pao.vy=MathDG.random(9, 21);
			md_pao.ti.hardVO.v3d_a.y=-1;
			
			var scale:Number=MathDG.random(60, 100)/100;
			var scaleSpeed:Number=-MathDG.random(1, 2)/100;
			md_pao.scale.fill(scale, scale, scale);
			md_pao.ti.hardVO.v3d_sv.fill(scaleSpeed,scaleSpeed,scaleSpeed);
			md_pao.life=-1;
			
			md_g.addChild(md_pao);
		}	
	}
}
}
